#include <stdio.h>

int isPrime(int n){
    if ( n <= 1 ) return 0;
    if ( n == 2 ) return 1;
    if ( n % 2 == 0 ) return 0;
    for (int i = 3; i * i <= n; i += 2){
        if (n % i == 0) return 0;
    }
    return 1;
}

int main(){
    int a, n, count = 0;
    scanf("%d,%d", &a, &n);
    
    if (a % 2 == 0) a++;

    while( count < n){
        if ((isPrime(a) == 1) && (isPrime( a + 2 ) == 1)){
            printf("%d:%d\n", a, a + 2);
            count ++;
        }
        a += 2;
    }
    return 0;
}
